//build:20240525
//To simplify the use of the micro-light communication protocol in the .net component, .net is encapsulated in this worker. Users only need to subscribe to events in the eventcenter to listen to .net.
import log from './dxLogger.js'
import net from './dxNet.js'
import dxMap from './dxMap.js'
import std from './dxStd.js'
const map = dxMap.get('default')
const options = map.get("__net__run_init")

function run() {
    net.worker.beforeLoop(options)
    log.info('net worker start......')
    std.setInterval (function() {
        try {
            net.worker.loop()
        } catch (error) {
            log.error(error)
        }
    },100)
}
try {
    run()
} catch (error) {
    log.error(error)
}
